3.9.77 \(\int (d \cos (e+f x))^n (a+b \sec (e+f x)) \, dx\) [877]

Optimal. Leaf size=132 \[ -\frac {b (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a (d \cos (e+f x))^{1+n} \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+n) \sqrt {\sin ^2(e+f x)}} \]

[Out]

-b*(d*cos(f*x+e))^n*hypergeom([1/2, 1/2*n],[1+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/f/n/(sin(f*x+e)^2)^(1/2)-a*(d*co
s(f*x+e))^(1+n)*hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/d/f/(1+n)/(sin(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4310, 16, 2827, 2722} \begin {gather*} -\frac {a \sin (e+f x) (d \cos (e+f x))^{n+1} \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{d f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {b \sin (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {n+2}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Cos[e + f*x])^n*(a + b*Sec[e + f*x]),x]

[Out]

-((b*(d*Cos[e + f*x])^n*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Cos[e + f*x]^2]*Sin[e + f*x])/(f*n*Sqrt[Sin[e +
 f*x]^2])) - (a*(d*Cos[e + f*x])^(1 + n)*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*Sin[e +
f*x])/(d*f*(1 + n)*Sqrt[Sin[e + f*x]^2])

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 4310

Int[(csc[(a_.) + (b_.)*(x_)]*(B_.) + (A_))*(u_), x_Symbol] :> Int[ActivateTrig[u]*((B + A*Sin[a + b*x])/Sin[a
+ b*x]), x] /; FreeQ[{a, b, A, B}, x] && KnownSineIntegrandQ[u, x]

Rubi steps

\begin {align*} \int (d \cos (e+f x))^n (a+b \sec (e+f x)) \, dx &=\int (d \cos (e+f x))^n (b+a \cos (e+f x)) \sec (e+f x) \, dx\\ &=d \int (d \cos (e+f x))^{-1+n} (b+a \cos (e+f x)) \, dx\\ &=a \int (d \cos (e+f x))^n \, dx+(b d) \int (d \cos (e+f x))^{-1+n} \, dx\\ &=-\frac {b (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a (d \cos (e+f x))^{1+n} \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+n) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 106, normalized size = 0.80 \begin {gather*} -\frac {(d \cos (e+f x))^n \csc (e+f x) \left (b (1+n) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right )+a n \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right )\right ) \sqrt {\sin ^2(e+f x)}}{f n (1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d*Cos[e + f*x])^n*(a + b*Sec[e + f*x]),x]

[Out]

-(((d*Cos[e + f*x])^n*Csc[e + f*x]*(b*(1 + n)*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Cos[e + f*x]^2] + a*n*Cos
[e + f*x]*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2])*Sqrt[Sin[e + f*x]^2])/(f*n*(1 + n)))

________________________________________________________________________________________

Maple [F]
time = 0.09, size = 0, normalized size = 0.00 \[\int \left (d \cos \left (f x +e \right )\right )^{n} \left (a +b \sec \left (f x +e \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(f*x+e))^n*(a+b*sec(f*x+e)),x)

[Out]

int((d*cos(f*x+e))^n*(a+b*sec(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^n*(a+b*sec(f*x+e)),x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e) + a)*(d*cos(f*x + e))^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^n*(a+b*sec(f*x+e)),x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e) + a)*(d*cos(f*x + e))^n, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \cos {\left (e + f x \right )}\right )^{n} \left (a + b \sec {\left (e + f x \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))**n*(a+b*sec(f*x+e)),x)

[Out]

Integral((d*cos(e + f*x))**n*(a + b*sec(e + f*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^n*(a+b*sec(f*x+e)),x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e) + a)*(d*cos(f*x + e))^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\cos \left (e+f\,x\right )\right )}^n\,\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(e + f*x))^n*(a + b/cos(e + f*x)),x)

[Out]

int((d*cos(e + f*x))^n*(a + b/cos(e + f*x)), x)

________________________________________________________________________________________